/*
 * Definition for a file converter
 * Defines all required functions
 */

package at.nhmwien.schema_mapping_tool.schemaReaders;

import java.util.*;
import java.io.*;

/**
 *
 * @author wkoller
 */
public abstract class FileConverter {
    // We provide two ways to call the parseFile function, because reading the defs from a jar requires a stream
    //public abstract LinkedHashMap<String,LinkedHashMap> parseFile( File inputFile );
    public abstract LinkedHashMap<String,LinkedHashMap> parseFile( InputStream inputFile );

    public LinkedHashMap<String,LinkedHashMap> parseFile( File inputFile ) {
        try {
            return this.parseFile(new FileInputStream( inputFile ) );
        }
        catch( Exception e ) {
            e.printStackTrace();
        }

        return null;
    }
}
